package com.lovetemperature.action;

import com.lovetemperature.model.Staff;
import com.lovetemperature.service.StaffService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class EditStaffAction extends ActionSupport {
	private StaffService staffService;
	private Staff curStaff;
	
	public String show() {
		curStaff = (Staff) ActionContext.getContext().getSession().get("user");
		return "success";
	}
	
	public String submit(){
		staffService.update(curStaff);
		return "success";
	}

	public StaffService getStaffService() {
		return staffService;
	}

	public void setStaffService(StaffService staffService) {
		this.staffService = staffService;
	}

	public Staff getCurStaff() {
		return curStaff;
	}

	public void setCurStaff(Staff curStaff) {
		this.curStaff = curStaff;
	}
}
